<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateGroupsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('groups', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name', 50);                      // 组名
            $table->tinyInteger('level');                    // 级别值
            $table->text('menu');                            // 后台菜单ID集合
            $table->text('permissions');                     // 允许访问的功能集合
            $table->boolean('status')->default(1);           // 状态      
            $table->string('remark');                        // 备注
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('groups');
    }
}
